package com.gao.security.ferrmarker.core.context.authentication.domain;


import com.gao.security.ferrmarker.core.base.Credentials;
import com.gao.security.ferrmarker.core.util.MD5Util;

/**
 * <p></p>
 *
 * @author GaoShuangWen
 * @since 2019-07-18 16:34
 */

public class Password implements Credentials {

    private String password;

    private Password(String password) {
        this.password = password;
    }

    public static Password newInstance(String password){
        return new Password(MD5Util.stringMD5(password));
    }

    @Override
    public Object getCredentials() {
        return this.password;
    }



}
